import React, { Fragment, memo } from "react";

const Index = ({ title, borderBottom, hideRow, children, className }) => {
	return (
		<Fragment>
			{hideRow ? (
				children
			) : (
				<div className={`ant-form-item-wrapper ${className}`}>
					{title ? <h3 className="ant-form-item-no-colon">{title}</h3> : ""}
					<div className={`${className}-content`}>{children}</div>
				</div>
			)}
			{borderBottom !== undefined && !hideRow ? (
				<div
					className="cu-border"
					style={{
						height: `${borderBottom}px`
					}}></div>
			) : (
				<></>
			)}
		</Fragment>
	);
};

export default memo(Index);
